<?php
//测试引导文件
require_once dirname( __FILE__ ) . '/../Bootstrap.php';

//定义测试入口， 可以实现批量测试
if( !defined('PHPUnit_MAIN_METHOD') ) 
{
    define('PHPUnit_MAIN_METHOD', 'AllTests::main');
}

class AllTests
{
    public static function main()
    {
        PHPUnit_TextUI_TestRunner::run( self::suite() );
    }

    public static function suite()
    {
        $suite = new PHPUnit_Framework_TestSuite('ProjectY - AllTests');
        $suite->addTestSuite( 'Unit_AllTests' );
        $suite->addTestSuite( 'Api_AllTests' );

        return $suite;
    }
}

if( PHPUnit_MAIN_METHOD == 'AllTests::main') 
{
    AllTests::main();
}